#ifndef __W25Q64_H
#define __W25Q64_H

#include "main.h"
#include "w24q64ins.h"

static HAL_StatusTypeDef SPI_Transmit(uint8_t* send_buf, uint16_t size);
static HAL_StatusTypeDef SPI_Receive(uint8_t* recv_buf, uint16_t size);
uint16_t W25QXX_ReadID(void);
static uint8_t W25QXX_ReadSR(uint8_t reg);
static void W25QXX_Wait_Busy(void);
int W25QXX_Read(uint8_t* buffer, uint32_t start_addr, uint16_t nbytes);
void W25QXX_Write_Enable(void);
void W25QXX_Write_Disable(void);
void W25QXX_Erase_Sector(uint32_t sector_addr);	
void W25QXX_Page_Program(uint8_t* dat, uint32_t WriteAddr, uint16_t nbytes);


#endif

